<template>
    <div>
        <mHeader></mHeader>
        <div class="main-con">
            <div class="left_main">
                <leftMenu />
            </div>
            <div class="rightMain">
                <!-- 人物 -->
                <div class="r_main">
                    <div class="left-menu">
                        <div @click="goPage('/columnPost/library')" :class="{ active: path == '/columnPost/library' }">
                            <span>文库发文</span>
                        </div>
                        <div @click="goPage('/columnPost/List')" :class="{ active: path == '/columnPost/List' }">
                            <span>目录发文</span>
                        </div>

                        <!-- <div @click="goPage('/columnPost/resource')"
                            :class="{ active: path == '/columnPost/resource' }">
                            <span>资源库目录</span>
                        </div> -->
                    </div>
                    <div class="form_con">
                        <router-view></router-view>
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>
<script>
import leftMenu from '@/components/leftMenu.vue';
export default {
    components: {
        leftMenu
    },
    data() {
        return {
            menuList: [],

        };
    },
    computed: {
        path() {
            return this.$route.path
        }
    },
    mounted() {

        console.log(this.path);

    },
    methods: {
        onSubmit() {
            console.log('submit!', this.form);
        },
        goPage(url) {
            if (this.path != url) {
                this.$router.push(url)
            }
        }
    },
}
</script>
<style lang="scss" scoped>
.main-con {
    display: flex;

    .left_main {
        margin-right: 1.04rem;
    }
}

.rightMain {
    flex: 1;
    border-top: 0.05rem solid #E8E8E8;

    .top {
        padding: 1.1rem 1.04rem;
        height: 4.17rem;
        display: flex;
        align-items: center;
        background-color: #1068E7;
        width: 100%;

        strong {
            font-weight: bold;
            font-size: 1.50rem;
            color: #FFFFFF;
            line-height: 1.97rem;
            font-family: Microsoft YaHei;
        }

        span {
            font-family: Microsoft YaHei;
            font-weight: 400;
            font-size: 1.15rem;
            color: #FFFFFF;
            margin-left: 1.35rem;
        }
    }

    .r_main {
        display: flex;

        .left-menu {
            padding: 0 0.85rem;
            border-right: 0.01rem solid #E8E8E8;

            >div {
                width: 6.25rem;
                height: 98px;
                display: flex;
                align-items: center;
                justify-content: center;
                border-bottom: 0.01rem solid #E8E8E8;
                cursor: pointer;

                &:last-child {
                    border: none;
                }

                span {
                    font-weight: 400;
                    font-size: 1.04rem;
                    color: #000000;
                    font-weight: 400;
                }
            }

            .active {
                span {
                    display: flex;
                    align-items: center;
                    justify-content: center;
                    width: 6.25rem;
                    height: 2.5rem;
                    background: #4ABAFF;
                    border-radius: 0.31rem;
                    color: #FFFFFF;
                }
            }
        }

        .form_con {


            flex: 1;
            // overflow-y: auto;
        }
    }
}
</style>